<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap {

    protected function _initDoctype() {
        $this->bootstrap('view');
        $view = $this->getResource('view');
        $view->doctype('XHTML1_STRICT');
    }

    protected function _initDatabaseConnection() {
        $db = Zend_Db::factory('PDO_MYSQL',
                        array(
                            'host'=> 'localhost',
                            'dbname' => 'electronica_zend',
                            'username'=> 'root',
                            'password'=> "")
        );
        $db->getProfiler()->setEnabled(false);
        Zend_Db_Table_Abstract::setDefaultAdapter($db);
        Zend_Db_Table::setDefaultAdapter($db);

    }
    protected function _initViewHelpers()
    {
        //assuming you already have this function in your bootstrap
        //jQuery (using the ui-lightness theme)
        $view = new Zend_view();
        $view->addHelperPath("ZendX/JQuery/View/Helper", "ZendX_JQuery_View_Helper");
        $view->jQuery()->addStylesheet('/js/jquery/css/ui-lightness/jquery-ui-1.8.12.custom.css')
        ->setLocalPath('/js/jquery/js/jquery-1.5.1.min.js')
        ->setUiLocalPath('/js/jquery/js/jquery-ui-1.8.12.custom.min.js');
        $viewRenderer = new Zend_Controller_Action_Helper_ViewRenderer();
        $viewRenderer->setView($view);
        Zend_Controller_Action_HelperBroker::addHelper($viewRenderer);
    }

     protected function _initAutoload()
    {
        $resourceLoader=new Zend_Loader_Autoloader_Resource(array(
            'basePath'=>APPLICATION_PATH,
            'namespace'=>'APP_'));
        $resourceLoader->addResourceType('form', 'forms/','Form');
    }


}

